<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <select name="" id="">
        <option value="北京">北京</option>
        <option value="上海">上海</option>
        <option value="广州">广州</option>
        <option value="深圳">深圳</option>
        <option value="武汉">武汉</option>
    </select>

    <script>
        
        const select = document.querySelector('select');
        select.addEventListener('change',function(){
            console.log('select发生了改变');
            console.log(this.value);
        })
        // 总结:可以通过select标签获取到被选中的option的value值
    </script>
</body>
</html>